package dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;

import dao.MajorPlanDao;
import util.DBUtils;
import vo.MajorPlan;

public class MajorPlanDaoImpl implements MajorPlanDao {

	@Override
	public void save(MajorPlan mp) throws SQLException {
		String sql = "insert into majorPlan(majorName,trainingPurpose,trainingContent,classHours,teacher)"
				+ "values(?,?,?,?,?)";
		QueryRunner qr = new QueryRunner();
		qr.update(DBUtils.getConnection(), sql,mp.getMajorName(), mp.getTrainingPurpose(),
				mp.getTrainingContent(), mp.getClassHours(), mp.getTeacher());
	}

	@Override
	public void delete(int majorId) throws SQLException {
	}

	@Override
	public void update(MajorPlan major) throws SQLException {
	}

	@Override
	public MajorPlan findById(int majorId) throws SQLException {
		return null;
	}

	@Override
	public List<MajorPlan> find() throws SQLException {
		return null;
	}

}
